import React from 'react';
import { Link } from 'react-router-dom';

export default () => {
  const list = [
    {id: 100, name: '产物1', author: 'lion'},
    {id: 101, name: '产物2', author: 'lion'},
    {id: 102, name: '产物3', author: 'lion'},
  ];
  return <div>
    这里是列表页：一条条的数据都展示在这里<br />
    <ul>
    {list.map((item, index) => {
      return <li key={index}>
        <span style={{padding: '10px'}}>[产物名] {item.name}</span>
        <span style={{padding: '10px'}}>[创建者] {item.author}</span>
        <span style={{padding: '10px'}}>[操作] <Link to={`/creator?id=${item.id}`}>去搭建</Link></span>
      </li>;
    })}
    </ul>
  </div>
}